import { ResPage, ExamQuestion, ResultData } from "@/api/interface/index";
import http from "@/api";

/**
 * @name 题库管理模块
 */
// 获取题库列表
export const getExamQuestionList = (params: ExamQuestion.ReqExamQuestionParams) => {
  return http.post<ResPage<ExamQuestion.ResExamQuestionList>>(`/exam/question/query`, params);
};
// 获取题库详情
export const getExamQuestionDtl = (params: { questionId: number }) => {
  return http.post<ResultData>(`/exam/question/detail`, params);
};
// 新增题库
export const addExamQuestion = (params = {}) => {
  return http.post(`/exam/question/add`, params);
};
// 编辑题库
export const editExamQuestion = (params: { questionId: string }) => {
  return http.post(`/exam/question/modify`, params);
};

// 删除题库
export const deleteExamQuestion = (params: { questionId: string }) => {
  return http.post(`/exam/question/remove`, params);
};

// 获取题库选择列表
export const getExamQuestionSelList = (params = {}) => {
  return http.post(`/exam/question/selectionList`, params);
};
